/*
 * HashTable.cpp
 *
 *  Created on: 10/10/2012
 *      Author: pablo
 */

#include"HashTable.h"

unsigned int HashTable::f(unsigned int clave){
	return (clave % this->tabla.size());
}

unsigned int HashTable::getTamanio(){
	return this->tabla.size();
}

void HashTable::modifElemTabla(unsigned int pos,unsigned int value){
	this->tabla.at(pos) = value;
}

unsigned int HashTable::getBloque(unsigned int pos){
	return this->tabla[pos];
}

void HashTable::nuevoBloque(unsigned int idBloque){
	this->tabla.push_back(idBloque);
}

/**
 * Se crea la tabla inicializada en cero con el tamanio indicado en el parámetro
 */
HashTable::HashTable(unsigned int tamInicial){
	for (unsigned int i=0; i<tamInicial ;i++){
		this->tabla.push_back(0);
	}
}


